  watch: {
    getToken: function token(newToken) {
      if (newToken) {
        const authToken = getCookie('token');
        Toast(`登陆成功${authToken}`);
        const redirect = this.$route.query.redirect;
        if (!redirect) {
          this.$router.replace('main');
        } else {
          this.$router.replace(redirect);
        }
      }
    },
  },
};